import glob
import os

import numpy
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
# from model import DeepLabv3plus
#
# x = torch.randn(2, 3, 224, 224)
# x=x.numpy()
# print(len(x.shape))
# print(x.size)
# # model = DeepLabv3plus(variant="resnet50", num_classes=19)
# # y = model(x)
# # print(y.shape)
# a = np.array([1, 2])
#
# print(isinstance(a, numpy.ndarray))
#
# print(isinstance(x, torch.Tensor))

# k=glob.glob(os.path.join(r"E:\note\cv\data\CamVid\test", '*.png'))
# print(len(k))
# for item in k:
#     print(item)

from utils import loadyaml

args = loadyaml(r"/home/ubuntu/code/pytorch_code/1-seg/code/config/deeplabv3plus_resnet50_720x960_80k_camvid.yaml")
print(args.sched == "cosine")

# a=["sdadsadasd","d","asda"]
# for item in a:
#     print("|{:>20} 1|".format(item))

# a=nn.Conv2d(3,4,3)
# for name,param in a.named_parameters():
#     print(param.grad)